package com.example.tys.daggermvp.dagger2.component;

import android.app.Application;

import com.example.tys.daggermvp.Application.DaggerApplication;
import com.example.tys.daggermvp.dagger2.ActivityBindingModule;

import javax.inject.Singleton;

import dagger.BindsInstance;
import dagger.Component;
import dagger.android.AndroidInjector;
import dagger.android.support.AndroidSupportInjectionModule;

/**
 *
 * @author tys
 * @date 2018/4/14
 */
@Singleton
@Component(modules ={ActivityBindingModule.class,
        AndroidSupportInjectionModule.class} )
public interface AppComponent extends AndroidInjector<DaggerApplication> {

    @Component.Builder
    interface Builder {
        @BindsInstance
        AppComponent.Builder application(Application application);

        AppComponent build();
    }
}

